﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading.Tasks;
using SignalR;
using SignalR.Hosting;
using System.Web.Routing;

namespace ChatSignalR
{
    public partial class _Default : System.Web.UI.Page
    {
    }

    public class MyConnection : PersistentConnection
    {
        protected override Task OnReceivedAsync(IRequest request, string connectionId, string data)
        {
            // Broadcast data to all clients
            return Connection.Broadcast(data);
        }
    }
}
